package easy

func SatisfiesConditions(grid [][]int) bool {
	for i := range grid {
		for j := range grid[0] {
			if i+1 < len(grid) && grid[i][j] != grid[i+1][j] {
				return false
			}
			if j+1 < len(grid[0]) && grid[i][j] == grid[i][j+1] {
				return false
			}
		}
	}
	return true
}
